package SV_SCRIPT;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class Fixed_02 {
    void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        final String dispatcher = request.getParameter("dispatcher");
        if(isValid(dispatcher)){
            request.getRequestDispatcher("/" + dispatcher).include(request, response);
        }
    }

    private boolean isValid(String dispatcher) {
        return dispatcher.equals("fixed");
    }
}
